import request from '@/utils/request'

// 攻略列表
export function getStrategyList(params) {
  return request({
    url: `/customer/strategy/list`,
    method: 'get',
    params
  })
}

// 新增攻略
export function strategyAdd(data) {
  return request({
    url: `/customer/strategy/add`,
    method: 'post',
    data
  })
}

// 攻略点赞
export function strategyLike(params) {
  return request({
    url: `/system/relation/strategyLike`,
    method: 'get',
    params
  })
}

// 取消点赞
export function strategyLikeCance(params) {
  return request({
    url: `/system/relation/strategyLikeCancel`,
    method: 'get',
    params
  })
}

// 攻略详情
export function getStrategyDetail(strategyId) {
  return request({
    url: `/customer/strategy/${strategyId}`,
    method: 'get'
  })
}

// 评论详情
export function getCommentDetail(strategyId) {
  return request({
    url: `/system/comment/${strategyId}`,
    method: 'get'
  })
}

// 评论列表
export function getCommentList(params) {
  return request({
    url: `/system/comment/list`,
    method: 'get',
    params
  })
}

// 评论新增
export function commentAdd(data) {
  return request({
    url: `/system/comment/add`,
    method: 'post',
    data
  })
}

// 关注
export function customerAttention(params) {
  return request({
    url: `/system/relation/customerAttention`,
    method: 'get',
    params
  })
}

// 取消关注
export function customerAttentionCancel(params) {
  return request({
    url: `/system/relation/customerAttentionCancel`,
    method: 'get',
    params
  })
}

// 攻略收藏
export function strategyCollect(params) {
  return request({
    url: `/system/relation/strategyCollect`,
    method: 'get',
    params
  })
}

// 取消收藏
export function strategyCollectCancel(params) {
  return request({
    url: `/system/relation/strategyCollectCancel`,
    method: 'get',
    params
  })
}